home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / demo / hyperxbu.sit / HyperXBug Demo / HyperXBug libs / CXBugHCDemo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-06  |  1.4 KB  |  48 lines

  1. #define _H_CXBugHCDemo
  2. #include <Color.h>
  3. #include <MacTypes.h>
  4. #include "HyperXCmdHC.h"
  5.  
  6. #define    SetUpHyperXBug(aParamPtr, pipeName)      \
  7.     if    (!XDebugging) {    RememberA0();    SetUpA4();} \
  8.         pipeName = Create_Pipe(XDebugging,aParamPtr); 
  9.     /*    Done with the Macro    */
  10.  
  11. #define CleanUpHyperXBug(pipeName)    \
  12.     ClosePipe(pipeName);            \
  13.     if    (!XDebugging) {                \
  14.          UnloadA4Seg(0L);            \
  15.          RestoreA4();                \
  16.         }
  17.  
  18.  
  19. /*************************    XBug Interface Object Description    *******************/
  20. struct    CXBug : indirect{
  21.     /* Instance Variables    */
  22.     Boolean    Debugging;        
  23.     XCmdPtr            paramPtr;
  24.     Str255            AppName;    /* Must be a Pascal String    */
  25.     Str255            MesgForHC;    /* Mesg that idle can access, eg. Push DoCallBack Btn */
  26.     Str31            volumeName;
  27.     long            directoryID;
  28.     long            WDRefNum;    /* zang, int vs long.Set the volume, back to HC    */
  29.     Handle            PBPlusHandle;    /* Now we can send covert messages to HC    */
  30.     
  31.     /*    Instance Methods    */
  32.     CXBug    *IXBug(Boolean    Debugging,    XCmdPtr    theparamPtr);    /* Most likely will alloc    */
  33.     int        Destroy(void);
  34.     void    reconstructWD();
  35.     void    GoToHC();
  36.  
  37. /**********    The XCMD glue routines     ***********************/
  38.  
  39.  Handle        PasToZero(StringPtr pasStr);
  40.  Handle        GetFieldByName(Boolean cardFieldFlag, StringPtr fieldName);
  41.  void        SetFieldByName(Boolean cardFieldFlag, StringPtr fieldName, Handle fieldVal);
  42. };
  43.  
  44. extern    CXBug    *Create_Pipe();
  45. extern    void    ClosePipe();
  46. extern    char     *ToCstr();
  47. extern    char     *ToPstr();
  48.